package com.run.spring.mapper;

import com.run.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @description:
 * @project springboot_demo
 * @author HeWenWen
 * @date 2024-09-13 16:03
 * @version 1.0
 */
@Mapper
@Repository
public interface UserMapper {

    @Select("SELECT * FROM user where id = #{id}")
    public User findById(Integer id);

    @Select("select * from user")
    public List<User> findAll();

}
